#!/usr/bin/python

class Singleton:
  """Implements the Singleton design pattern."""
  _objects = {}

  def __init__( self ):
    class_name = self.__class__
    #if the dictionary doesn't exist, create it
    if self._objects.has_key( class_name ) == 0 :
      self._objects[class_name] = {}

    self.__dict__ = self._objects[class_name]
